﻿using MockPrjTeam1.DAO;
using MockPrjTeam1.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MockPrjTeam1.Biz
{
    public class DistrictBiz
    {
        public List<District> GetActive(int regionId)
        {
            var dao = new DistrictDAO();

            return dao.GetActive(regionId);
        }

        public List<District> GetAllRegionDistrict(int regionId)
        {
            var dao = new DistrictDAO();
            return dao.GetAllRegionDistrict(regionId);
        }

        public District GetOne(int districtId)
        {
            var dao = new DistrictDAO();
            return dao.GetOne(districtId);
        }

        public bool CheckName(string name, int districtId)
        {
            var dao = new DistrictDAO();
            return dao.CheckName(name, districtId);
        }

        public bool Edit(District entity)
        {
            var dao = new DistrictDAO();
            return dao.Edit(entity);
        }

        public bool Create(District entity)
        {
            var dao = new DistrictDAO();
            return dao.Create(entity);
        }

        public List<District> Filter(int regionId, int filterId, int isActive)
        {
            var dao = new DistrictDAO();
            return dao.Filter(regionId, filterId, isActive);
        }
    }
}